/*! \file expr.h
	\author tsvetkov_ii

	Defines an expression node
*/
#pragma once
#include<stdio.h>
#include "abstractnode.h"
#include "message.h"
#include "constant.h"
#include "id.h"


class Expression: public AbstractNode
{
private:
	std::string c_type;
	class Expression * c_left;
	class Expression * c_right;
	Id * c_identiefer;
	class Constant * c_constant;
	class Message * c_message;
	bool c_isNil;

public:

	/*! Defines an Expression node 
	*/
	Expression (std::string type, class Expression * left, class Expression * right);

	/*! Defines an Expression node of identiefer
	*/
	Expression (Id * identiefer);

	/*! Defines an Expression node of constant
	*/
	Expression (class Constant * constant);

	/*! Defines an Expression node of Nil
	*/
	Expression (bool isNil);

	/*! Defines an Expression node of message
	*/
	Expression (class Message * message);

	/*! Defines an Expression node of return
	*/
	Expression (class Expression * expr);

	const std::string & type();

	void write(GraphStream * s);
	
	//! Destructor
	~Expression();
};
